package com.people.whx.demo.rabbitmq;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class Sender {

    @Autowired
    private AmqpTemplate rabbitTemplate;

    public void sendPlainMessage(String message){
        rabbitTemplate.convertAndSend("test",message+" "+new Date());
    }
}
